class_name 炮台Operation extends Node


var operationManager:OperationManager
var big:Big

func init(om:OperationManager):
	self.operationManager = om
	return self

# 炮击
func preparation_炮台_impact():
	operationManager.arr_listeningPoints.clear()
	var point = operationManager.selectedPoint
	var arrAroundPoints = GameUtils.getArrPointsAround1And2(point)
	for p in arrAroundPoints:
		if p.small != null:
			continue
		if p.big != null:		#有大子
			if p.big.player.is_me:	#是自己的
				continue
		operationManager.arr_listeningPoints.append(p)
	GameUtils.neatAnimation()
	big = point.big
	big.detailHide()

func 炮台_impact(point:Point):
	WebSocketManager.sendObj(true,"炮台_impact",{"start":big.point.id,"end":point.id})
	operationManager.cancel()
